package org.xlx.xlx_oa.role_user.api;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
import org.xlx.xlx_oa.common.PageVo;
import org.xlx.xlx_oa.common.ResponseBean;
import org.xlx.xlx_oa.role_user.domain.dto.SysNotificationDto;

import java.util.List;

@ApiImplicitParams(value = {
        @ApiImplicitParam(name = "x-request-id", value = "${clientTraceId}",
                paramType = "header", dataType = "String", dataTypeClass = String.class),
        @ApiImplicitParam(name = "Authorization", value = "${BearerToken}",
                paramType = "header", dataType = "String", dataTypeClass = String.class, required = false)
})
@ApiResponses(value = {
        @ApiResponse(code = 400, message = "Bad Request"),
        @ApiResponse(code = 401, message = "Authentication Error"),
        @ApiResponse(code = 403, message = "Authorization Error"),
        @ApiResponse(code = 500, message = "Internal Server Error"),
        @ApiResponse(code = 503, message = "Service Unavailable")
})
public interface SysNotificationApi {
    @PostMapping("/uploadImage")
    ResponseBean<String> uploadFile(@RequestPart("file") MultipartFile file);

    @PostMapping("/notifications")
    ResponseBean<List<SysNotificationDto>> getPageNotifications(@RequestBody PageVo pageVo);

    @PostMapping("/count")
    ResponseBean getCount();
}
